package com.dgut.admodule.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

@Entity
@Table(name="t_adsbid")
public class Adsbid {
	private Long id;
	private String adsName;
	private String adsDecription;
	private String cName;
	private Double bidPrice;
	private Bidding bidding;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	public String getAdsName() {
		return adsName;
	}
	public String getAdsDecription() {
		return adsDecription;
	}
	public Double getBidPrice() {
		return bidPrice;
	}
	public String getcName() {
		return cName;
	}
	@ManyToOne(cascade=CascadeType.ALL)
	@JsonIgnore
	public Bidding getBidding() {
		return bidding;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	public void setAdsName(String adsName) {
		this.adsName = adsName;
	}
	public void setAdsDecription(String adsDecription) {
		this.adsDecription = adsDecription;
	}
	public void setBidPrice(Double bidPrice) {
		this.bidPrice = bidPrice;
	}
	public void setcName(String cName) {
		this.cName = cName;
	}
	public void setBidding(Bidding bidding) {
		this.bidding = bidding;
	}
	@Override
	public String toString() {
		return "Adsbid [id=" + id + ", adsName=" + adsName + ", adsDecription=" + adsDecription + ", cName=" + cName
				+ ", bidPrice=" + bidPrice + "]";
	}
}
